<?php
/**
 * Created by PhpStorm.
 * User: evans
 * Date: 2017/10/15
 * Time: 下午11:08
 */

$customer_name = $_POST["customer_name"];
$customer_phone = $_POST["customer_phone"];

$db = new MySQLi("localhost","root","kolin.wina24","vr5913.cn");
!mysqli_connect_error() or die("连接失败！");
$sql = "insert into customer (customer_name, customer_phone) values('{$customer_name}','{$customer_phone}')";

$result = $db->query($sql);
if($result)
{
    header("location:index.php");
}
else
{
    echo "添加失败！";
}